// Layout组件样式
.layout {
  display: flex;
  height: 100vh;
  background-color: var(--bg-regular);
  
  .layout-sidebar {
    width: 220px;
    background-color: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    transition: width 0.3s ease;
    overflow: hidden;
    
    .sidebar-header {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 60px;
      font-size: 20px;
      font-weight: bold;
      color: var(--primary-color);
      border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar-menu {
      padding: 20px 0;
      
      .menu-item {
        padding: 12px 20px;
        cursor: pointer;
        transition: all 0.3s ease;
        
        &:hover {
          background-color: var(--bg-secondary);
        }
        
        &.active {
          background-color: rgba(64, 158, 255, 0.1);
          color: var(--primary-color);
          border-right: 3px solid var(--primary-color);
        }
        
        .menu-link {
          display: flex;
          align-items: center;
          text-decoration: none;
          color: inherit;
          
          .menu-icon {
            margin-right: 10px;
            font-size: 16px;
          }
          
          .menu-text {
            font-size: 14px;
          }
        }
      }
    }
  }
  
  .layout-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    
    .layout-header {
      height: 60px;
      background-color: var(--bg-primary);
      border-bottom: 1px solid var(--border-color);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 20px;
      
      .header-left {
        display: flex;
        align-items: center;
        
        .toggle-button {
          margin-right: 20px;
          font-size: 18px;
          cursor: pointer;
          color: var(--text-regular);
          
          &:hover {
            color: var(--primary-color);
          }
        }
        
        .breadcrumb {
          font-size: 14px;
          
          .breadcrumb-item {
            display: inline-block;
            color: var(--text-regular);
            
            &:not(:last-child) {
              margin-right: 10px;
              
              &::after {
                content: '/';
                margin-left: 10px;
                color: var(--text-placeholder);
              }
            }
            
            &.active {
              color: var(--primary-color);
            }
          }
        }
      }
      
      .header-right {
        display: flex;
        align-items: center;
        
        .header-item {
          margin-left: 20px;
          cursor: pointer;
          color: var(--text-regular);
          
          &:hover {
            color: var(--primary-color);
          }
        }
        
        .user-info {
          display: flex;
          align-items: center;
          cursor: pointer;
          
          .user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background-color: var(--primary-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
          }
          
          .user-name {
            font-size: 14px;
            color: var(--text-regular);
          }
        }
      }
    }
    
    .layout-content {
      flex: 1;
      padding: 20px;
      overflow-y: auto;
      
      .content-card {
        background-color: var(--bg-primary);
        border-radius: var(--border-radius);
        padding: 20px;
        box-shadow: var(--shadow-base);
      }
    }
  }
}

// 响应式设计
@media screen and (max-width: 1200px) {
  .layout {
    .layout-sidebar {
      width: 60px;
      
      .sidebar-header,
      .menu-text {
        display: none;
      }
      
      .menu-icon {
        margin-right: 0;
      }
    }
  }
}

// 登录页样式
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background-color: var(--bg-regular);
  
  .login-form {
    width: 400px;
    background-color: var(--bg-primary);
    padding: 40px;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    
    .form-header {
      text-align: center;
      margin-bottom: 30px;
      
      .form-title {
        font-size: 24px;
        font-weight: bold;
        color: var(--text-primary);
      }
    }
    
    .form-item {
      margin-bottom: 20px;
    }
    
    .form-button {
      width: 100%;
    }
  }
}